Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Rendered • View rawDownload


docs/agents/skills/identity-restore/SKILL.md db8a58536a8024e64af9fd60e8ec8f1532fd50dc (db8a5853) Text, 1.89 KB

Skill: identity-restore

Identity key import vs database zip restore, tutorial and Android pickers.

MeshChatX Identity Restore

Two different restores

┌──────────────────────┬────────────────────────────────────┬──────────────────────────────────────┐
│ Goal │ UI │ API / artifact │
├──────────────────────┼────────────────────────────────────┼──────────────────────────────────────┤
│ Identity private key │ Tutorial step 2, Identities import │ T383838POST /api/v1/identity/restore
│ LXMF + settings + DB │ About → Restore from File │ T383838POST /api/v1/database/restore (T383838.zip) │
└──────────────────────┴────────────────────────────────────┴──────────────────────────────────────┘

Never imply identity-key import restores message history.

Guards checklist

• File picker T383838accept: T383838.bin,.key,.identity,application/octet-stream,*/*
• Export download filename: T383838identity.bin
• Reject empty / oversized identity payloads (client + server, max 64 KiB)
• Normalize base32 by stripping all whitespace
• Multipart field order must not matter
• T383838ValueError → HTTP 400
• Re-import must preserve existing metadata (icons/addresses)
• Tutorial: import on Continue, activate on Finish. Split switch vs delete failures.
• Tutorial skip/abandon with pending import: confirm activate or warn
• IdentitiesPage: keep modal open during restore, toast errors, offer switch after success
• Android: map extension accepts to MIME types in T383838MainActivity

Tests to update

• T383838tests/frontend/TutorialModalMigration.test.js
• T383838tests/frontend/IdentitiesPage.test.js
• T383838tests/backend/test_identity_restore.py
• T383838tests/backend/test_identity_restore_http_api.py

Key files

• T383838meshchatx/src/frontend/components/TutorialModal.vue
• T383838meshchatx/src/frontend/components/settings/IdentitiesPage.vue
• T383838meshchatx/src/frontend/components/about/AboutPage.vue
• T383838meshchatx/src/backend/identity_manager.py
• T383838meshchatx/meshchat.py (identity backup/restore routes)
• T383838android/.../MainActivity.java


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────